<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function success(data) {
          console.log('拿到了Data数据：')
          console.log(data)
        }
      </script>
    
    <!-- 模拟同源策略 -->
      <script>
        success({ name: 'zs', age: 20 })
      </script>

    <!-- 模拟跨域时，JSONOP的工作原理 -->
    <script src="./js/getdata.js?callback=success"></script>
</body>
</html>